# Author zhouchunfeng

def bubble_sort(nums):
    n = len(nums)
    for i in range(n):
        swapped = False
        for j in range(0,n-i-1):
            print("j===",j)
            if nums[j] > nums[j + 1]:
                nums[j],nums[j + 1] = nums[j + 1],nums[j]
                swapped = True
            if not swapped:
                break
        return nums
    print(nums)
nums = list(range(1, 11))
sorted_numbers = bubble_sort(nums)
print(sorted_numbers)







